/*
 * Qinlan Shen
 * November 8, 2010
 * Pd. 8
 * 
 * Packet created from xSpeed and ySpeed.
 * 
 */

import java.awt.*;

public class Packet extends Enemy
{
	protected double xAccel;
	protected double yAccel;
	
	public Packet(Image i, int h, double xLoc, double yLoc, double xS, double yS)
	{
		img = i;
		hitbox = h;
		x = xLoc;
		y = yLoc;
		xSpeed = xS;
		ySpeed = yS;
		xAccel = 0;
		yAccel = 0;
	}
	
	public Packet(Image i, int h, double xLoc, double yLoc, double xS, double yS, double xA, double yA)
	{
		img = i;
		hitbox = h;
		x = xLoc;
		y = yLoc;
		xSpeed = xS;
		ySpeed = yS;
		xAccel = xA;
		yAccel = yA;
	}
	
	public void update()
	{
		x += xSpeed;
		y += ySpeed;
		xSpeed += xAccel;
		ySpeed += yAccel;
	}	
}